package com.pignest.framework.json;

import java.util.Date;

import com.pignest.hotel.util.DateUtil;

public class JsonDate extends JsonValue {

	private final Date value;

	public JsonDate(Date value) {
		this.value = value;
	}

	public JsonDate(long ms) {
		value = new Date(ms);
	}

	@Override
	public String toExternalRepresentation() {
		return "\"" + DateUtil.toString(value, DateUtil.DEFAULT_DATETIME_FORMAT) + "\"";
	}
}
